package p12.p1210;

import java.util.Scanner;

public class StringTest {


    public static void main(String[] args) {
        String user = "123";
        String passwd = "123";


        for (int i =0;i<=2;i++) {
            Scanner scanner = new Scanner(System.in);
            System.out.println("in put user:");
            String user1 = scanner.nextLine();
            System.out.println("in put passwd:");
            String passwd1 = scanner.nextLine();

            System.out.println("------------");
            System.out.println(user1);
            System.out.println(passwd1);
            System.out.println("-------------");


            if (user1.equals(user) && passwd1.equals(passwd)) {

                System.out.println("ok");
               // break;

                CaiNum.CaiShuZi();
                break;


            } else {

                if ((2 - i) == 0) {
                    System.out.println("账户被锁！");
                } else {
                    System.out.println("fail");
                    System.out.println("还有"+(2-i)+"机会");
                }

            }
        }

    }
}
